//
//  LookupSelectView.h
//  MClient
//
//  Created by  史正烨 on 10-9-7.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>

@class MCViewController;
@class MCSelectPicker;
@class MCControl;
@interface LookupSelectView : UIView<MCServer2ViewDelegate> {
	MCSelectPicker *selectPicker;
	UIToolbar* toolBar;
	MCControl*  textFieldView;
	MCViewController* parentViewController;
	BOOL      isShown;
	UIBarButtonItem *titleBtn;
	NSMutableDictionary *fieldData;
	NSString *dataObjectName;
	NSMutableDictionary *listLayout;
	NSMutableArray *queryFilter;
	NSMutableDictionary *datas;
	NSString *fieldName;	
	NSMutableArray *lookupBackFills;
    
    //NSMutableDictionary *listData;
    //int selectRow;
}

@property(nonatomic, assign)MCControl* textFieldView;
@property(nonatomic, assign)BOOL     isShown;
@property(nonatomic, retain)NSMutableDictionary *fieldData;
@property(nonatomic, retain)NSString *dataObjectName;
@property(nonatomic, retain)NSMutableDictionary *listLayout;
@property(nonatomic, retain)NSMutableArray *queryFilter;
@property(nonatomic, retain)NSMutableDictionary *datas;
@property(nonatomic, retain)NSString *fieldName;	
@property(nonatomic, retain)NSMutableArray *lookupBackFills;
@property(nonatomic, assign)MCViewController* parentViewController;

+ (LookupSelectView *)instance;

- (void)getDataFromServer;
- (void)selectCancelAction;
@end

@interface MCSelectPicker : UIView<UIPickerViewDataSource, UIPickerViewDelegate>
{
	UIPickerView        *_picker;
	NSString	        *_value;
	NSString            *_label;
	int					_row;
	NSMutableDictionary *_record;
}
@property(nonatomic, retain)UIPickerView        *_picker;
@property(nonatomic, retain)NSString	        *_value;
@property(nonatomic, retain)NSString	        *_label;
@property(nonatomic, assign)int                 _row;
@property(nonatomic, retain)NSMutableDictionary *_record;
@end
